package com.changgou.user.feign;

import com.changgou.user.pojo.User;
import entity.Result;
import entity.StatusCode;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 描述
 *
 * @author ljh
 * @version 1.0
 * @package com.changgou.user.feign *
 * @Date 2019-12-5
 * @since 1.0
 */
@FeignClient(name="user")
public interface UserFeign {

    /**
     * 申明 查询用户的信息
     * @param id
     * @return
     */
    @GetMapping("/user/load/{id}")
    public Result<User> loadById(@PathVariable(name="id") String id) ;


    @RequestMapping("/user/addPoints")
    public Result addPoints(@RequestParam(name="points")Integer points,
                            @RequestParam(name="username")String username);
}
